package com.ktjy.ch15.mapper;

import com.ktjy.ch15.entity.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysUserMapper {
    public SysUser getByAccount(@Param("account") String account);

    /**
     * 查询分页信息
     * @param sysUser
     * @param pageBegin
     * @param pageSize
     * @return
     */
    public List<SysUser> getPage(@Param("sysUser") SysUser sysUser,
                                 @Param("pageBegin") Integer pageBegin,
                                 @Param("pageSize") Integer pageSize);

    /**
     * 查询总记录数
     * @param sysUser
     * @return
     */
    public Integer count(@Param("sysUser") SysUser sysUser);

    public int insert(SysUser sysUser);

    public SysUser getById(@Param("id") Long id);

    public int update(SysUser sysUser);

    public int delete(@Param("id") Long id);

    public SysUser getByPassword(@Param("oldPassword") String oldPassword);
}
